load("//tools/lint:lint.bzl", "add_lint_tests")
load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_library",
    "drake_cc_package_library",
)

package(default_visibility = ["//visibility:public"])

# This should encompass every cc_library in this package, except for items that
# should only ever be linked into main() programs.
drake_cc_package_library(
    name = "test_utilities",
    testonly = 1,
    visibility = ["//visibility:public"],
    deps = [
        ":check_constraint_eval_nonsymbolic",
        ":check_gradient_sparsity_pattern",
    ],
)

drake_cc_library(
    name = "check_constraint_eval_nonsymbolic",
    testonly = 1,
    srcs = ["check_constraint_eval_nonsymbolic.cc"],
    hdrs = ["check_constraint_eval_nonsymbolic.h"],
    deps = [
        "//common/test_utilities",
        "//math:compute_numerical_gradient",
        "//math:gradient",
        "//solvers:constraint",
    ],
)

drake_cc_library(
    name = "check_gradient_sparsity_pattern",
    testonly = 1,
    srcs = ["check_gradient_sparsity_pattern.cc"],
    hdrs = ["check_gradient_sparsity_pattern.h"],
    deps = [
        "//math:gradient",
        "//solvers:constraint",
        "@googletest//:gtest_for_library",
    ],
)

add_lint_tests()
